package com.zhuss.controller.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.core.wrongWord.DetailWrongWordBo;
import com.zhuss.bean.bo.core.wrongWord.SearchWrongWordBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.core.wrongWord.WrongWordReadServiceExt;
import com.zhuss.exception.WpsException;


/**
 * @description: 敏感字查询Controller
 * @author: zhushanshuo
 * @create: Fri Nov 20 13:10:22 CST 2020
 **/
@RestController
@RequestMapping("/wrongWord")
public class WrongWordReadController extends BaseController {
	
	@Autowired
	@Qualifier("wrongWordReadService")
	private ReadService<Object, Object> wrongWordReadService;
	
	@Autowired
	@Qualifier("wrongWordReadServiceExt")
	private WrongWordReadServiceExt wrongWordReadServiceExt;
	
	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailWrongWordBo bo) throws WpsException {
		
		Object result = wrongWordReadService.detail(bo);
		return result;
    }
	
	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchWrongWordBo bo) throws WpsException {
		
		Object result = wrongWordReadService.list(bo);
		return result;
    }
	
}
